
import 'package:example/db/entity/login_table.dart';
import 'package:floor/floor.dart';

@dao
abstract class LoginDao {
  @Query('SELECT * FROM Login')
  Future<List<Login>> findAllLogin();

  @Query('SELECT userName FROM Login')
  Stream<List<String>> findAllLoginName();

  @Query('SELECT * FROM Login WHERE id = :id')
  Stream<Login?> findLoginById(int id);

  @insert
  Future<void> insertLogin(Login login);
}